function getType(fn) {
  var match = fn && fn.toString().match(/^\s*function (\w+)/);
  return match ? match[1] : ''
}

function a() {
  console.log('aa')
}
console.log(getType(Boolean))
